package cn.tedu.spring.di;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    @Value("球球球")
    private String serviceName;
//    @Autowired
//    private UserDao UserDao;
    private UserDao UserDao;
//    @Autowired
//    public void setUserDao(UserDao userDao) {
//        UserDao = userDao;
//    }
    @Autowired
    public UserService(cn.tedu.spring.di.UserDao userDao) {
        UserDao = userDao;
    }

    @Override
    public String toString() {
        return "UserService{" +
                "serviceName='" + serviceName + '\'' +
                ", UserDao='" + UserDao + '\'' +
                '}';
    }
}
